<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/base/base.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<!-- <title>用户添加</title> -->
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta name="description" content="Charisma, a fully featured, responsive, HTML5, Bootstrap admin template.">
	<meta name="author" content="Muhammad Usman">
	
<%-- 	<script type="text/javascript" src="<%=path %>/page/hr/user/js/user.js" ></script> --%>
<script type="text/javascript">
$().ready(function() {
	// validate signup form on keyup and submit
	$("#userAddForm").validate({
		rules: {
			name: {
				required: true,
				minlength: 2
			}
		},
		messages: {
			name: {
				required: "请输入用户名"
// 				minlength: "Your username must consist of at least 2 characters"
			}
		},
		 submitHandler: function(form) {
			// do other things for a valid form. this way the validation isn’t triggered again.
			form.submit();
		}
	});
}); 
function backList(path){
		window.location.href = path+'/userController/getUserList.do';
			}
</script>
</head>
<body>

	<div id="content" class="span11">
			
			<div class="row-fluid sortable">
				<div class="box span12">
					<div class="box-header well" data-original-title>
						<h2><i class="icon-edit"></i> 管理员管理</h2>
						<div class="box-icon">
							<a href="#" class="btn btn-setting btn-round"><i class="icon-cog"></i></a>
							<a href="#" class="btn btn-minimize btn-round"><i class="icon-chevron-up"></i></a>
							<a href="#" class="btn btn-close btn-round"><i class="icon-remove"></i></a>
						</div>
					</div>
					<div class="box-content">
						<form class="form-horizontal" id="userAddForm" action="<%=path%>/userController/updateUser.do" method="post">
						  <input type="hidden" name="id" value="${user.id }"/>
						  <fieldset>
							<legend><span class="icon icon-color icon-gear" title=".icon  .icon-color  .icon-gear "></span>&nbsp;修改管理员信息</legend>
							<div class="control-group">
								<label class="control-label" for="disabledInput"><span class="icon icon-color icon-locked" title=".icon  .icon-color  .icon-locked "></span>&nbsp;CODE&nbsp;号：</label>
								<div class="controls">
								  <input class="input-xlarge disabled" id="code" type="text" name="code" value="${user.code }" readonly="readonly">
								</div>
							  </div>
							<div class="control-group">
								<label class="control-label" for="focusedInput"><span class="icon icon-color icon-user" title=".icon  .icon-color  .icon-user "></span>&nbsp;用户名：</label>
								<div class="controls">
								  <input class="input-xlarge focused" id="name"  type="text" name="name" value="${user.name }" ></input>
								</div>
							 </div>
							 <div class="control-group">
								<label class="control-label" for="focusedInput"><span class="icon icon-color icon-key" title=".icon  .icon-color  .icon-key "></span>&nbsp;密&nbsp;&nbsp;码：</label>
								<div class="controls">
								  <input class="input-xlarge focused" id="pwd"  type="text" name="pwd" value="${user.pwd }">
								</div>
							 </div>

							<div class="form-actions">
							  <button type="submit" class="btn btn-primary">
						  		  <span class="icon icon-darkgray icon-check" title=".icon  .icon-darkgray  .icon-check "></span>
						  		  &nbsp;保&nbsp;&nbsp;存
					  		  </button>&nbsp;&nbsp;&nbsp;&nbsp;
							  <button type="button" class="btn" onclick="backList('<%=path%>');">
								  <span class="icon icon-color icon-undo" title=".icon  .icon-color  .icon-undo "></span>
								  &nbsp;返&nbsp;&nbsp;回
							  </button>
							</div>
						  </fieldset>
						</form>   

					</div>
				</div><!--/span-->

			</div><!--/row-->
	</div>
</body>
</html>